<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'${button.icon!}',plain:true"
onclick="eova_copy()">
	${button.name!}
</a>
<script type="text/javascript">
var eova_copy = function() {
	var $grid = $('#${gridId}');
    var rows = $grid.datagrid('getSelections');
    var num = rows.length;
    if (num != 1) {
    	$.slideMsg("复制元数据一次只能选择一个元对象！");
        return;
    }
    
    $.messager.prompt('提示信息', '请输入复制的新元对象编码', function(val){
    	if(val){
    		$.ajax({
    			url : '/meta/copy/' + rows[0].id + '-' + val,
    			dataType : 'json',
    			success : function(o) {
    				if (o.success) {
    					$grid.datagrid('load');	
    					$grid.datagrid('unselectAll');
    					$.slideMsg("操作成功！");
    				} else {
    					$.messager.alert("操作错误", o.msg ,'error');
    				}
    			}
    		});
    	}
	});
};
</script>